from bs4 import BeautifulSoup
html = """<form name='easypaysubmit' id='easypaysubmit' target='_blank' method='post' action='http://mertest.chinapnr.com/muser/publicRequests'>
	<input name='Version' type='hidden' value='10'/>
	<input name='CmdId' type='hidden' value='UserRegister'/>
	<input name='MerCustId' type='hidden' value='6000060007313892'/>
	<input name='BgRetUrl' type='hidden' value='https://www.baidu.com/'/>
	<input name='RetUrl' type='hidden' value='http://dev-www.zcbk.deayou.com/trust/chinapnr/register/return/20011318124917315444'/>
	<input name='UsrId' type='hidden' value=''/>
	<input name='UsrName' type='hidden' value=''/>
	<input name='IdType' type='hidden' value='00'/>
	<input name='IdNo' type='hidden' value='51343620000113288X'/>
	<input name='UsrMp' type='hidden' value='13210001001'/>
	<input name='UsrEmail' type='hidden' value=''/>
	<input name='MerPriv' type='hidden' value='20011318124917315444'/>
	<input name='ChkValue' type='hidden' value='1784F61D7A6FDB0C900808DEA6DCEA882A138E731234473B84CB2829DF2B66FF032E40697D9668DC4B054A2790BDCF1EF32D2DB4B807CAF7F89829BE7C10520C3AF44DEF8EA2DDD07141C49DDEC147ECEC6A3D8E7E3B751D5308171AB3131668D19822D7F05E2E7CAAC5DB1F5744821B4A8B439E9A4335614B6A2CD8E3467DE5'/>
	<input name='CharSet' type='hidden' value='UTF-8'/>
</form>
<script>document.forms['easypaysubmit'].submit();</script>
"""
soup = BeautifulSoup(html,"html.parser")
# 提取请求url
# ele = soup.form.get("action")
# print(ele)
# 提取请求的参数，格式为字典
# 提取参数
ele_all_a = soup.find_all("input")
#print(ele_all_a)
info = {}
for i in ele_all_a:
    print("name={} value={}".format(i.get("name"),i.get("value")))
    # 把值赋给字典，键值对
    info[i.get("name")]= i.get("value")
print(info)

